<?php

namespace api\controllers;

use common\queues\CustomSetSettlementCard;
use common\queues\Test;
use wodrow\yii\rest\Controller;

class NotifyController extends Controller
{
    /**
     * 分账通客户设置结算银行卡
     * @desc get
     * @param string $card_id 银行卡ID
     * @return mixed
     */
    public function actionFztCustomSetSettlementCard($card_id, $redirect_url = null)
    {
        \Yii::$app->queue->push(new CustomSetSettlementCard(['customBankCardId' => $card_id]));
        if ($redirect_url) {
            $redirect_url = urldecode($redirect_url);
            return $this->redirect($redirect_url);
        }
        return $this->success();
    }

    /**
     * 分账通客户设置结算银行卡
     * @desc get
     * @param string $card_id 银行卡ID
     * @return mixed
     */
    public function actionFztCustomUpdateMobile($redirect_url = null)
    {
        if ($redirect_url) {
            $redirect_url = urldecode($redirect_url);
            return $this->redirect($redirect_url);
        }
        return $this->success();
    }

    /**
     * 分账通客户设置结算银行卡
     * @desc get
     * @param string $card_id 银行卡ID
     * @return mixed
     */
    public function actionFztCustomUpdatePayPassword($redirect_url = null)
    {
        if ($redirect_url) {
            $redirect_url = urldecode($redirect_url);
            return $this->redirect($redirect_url);
        }
        return $this->success();
    }
}